package com.lihaozhe.orderservice.dto;

/**
 * 订单项数据传输对象
 *
 * @author 李昊哲
 * @version 1.0.0
 */

public class OrderItemDTO {
  /**
   * 商品ID
   */
  private Long productId;
  /**
   * 商品名称
   */
  private String productName;
  /**
   * 数量
   */
  private Integer quantity;
  /**
   * 单价
   */
  private Double price;

  // 构造函数

  public OrderItemDTO() {
  }

  public OrderItemDTO(String productName, Integer quantity, Double price) {
    this.productName = productName;
    this.quantity = quantity;
    this.price = price;
  }

  public OrderItemDTO(Long productId, String productName, Integer quantity, Double price) {
    this.productId = productId;
    this.productName = productName;
    this.quantity = quantity;
    this.price = price;
  }

  // Getter和Setter方法

  public Long getProductId() {
    return productId;
  }

  public void setProductId(Long productId) {
    this.productId = productId;
  }

  public String getProductName() {
    return productName;
  }

  public void setProductName(String productName) {
    this.productName = productName;
  }

  public Integer getQuantity() {
    return quantity;
  }

  public void setQuantity(Integer quantity) {
    this.quantity = quantity;
  }

  public Double getPrice() {
    return price;
  }

  public void setPrice(Double price) {
    this.price = price;
  }
}
